const baseSize = 16;
import store from "./store";
const getWidth = () => {
  var Width =
    window.innerWidth ||
    document.documentElement.clientWidth ||
    document.body.clientWidth;
  store.state.windowSize = Width;
  var Height =
    window.innerHeight ||
    document.documentElement.clientHeight ||
    document.body.clientHeight;
  store.state.windowSize = Width;
  store.state.windHeight = Height;
  console.log("W:" + Width + "H:" + Height);
  if (Width < 760) {
    store.state.OpenTheMenu = false;
  }
  return Width
};
getWidth();

function setRem() {
  let scale = document.documentElement.clientWidth / 1;
  document.documentElement.style.fontSize =
    baseSize * Math.min(scale, 1.0) + "px";
  console.log(Math.min(scale));
}
setRem();
window.onresize = function () {
  setRem();
 const jjher =  getWidth();
  if(jjher<760){ //手机端的不刷新
    return
  }
  // location.reload();
};
